<html>
<head>
	<meta charset="UTF-8">
	<title>全部文章</title>
	<script src="__APP__/js/jquery.js"></script>
	<link rel="stylesheet" href="__APP__/js/bootstrap.min.css"></head>
	<link rel="stylesheet" href="__APP__/js/uploadify.css"></head>
	<script src="__APP__/js/bootstrap.min.js"></script>
	
	<script src="__APP__/js/jquery.uploadify.js"></script>
	<style type="text/css">
	span{color: black; text-decoration: none;}
	a{color: black; text-decoration: none;}
	a:hover{color: red; text-decoration: none;}
	table td{font-size: 16px;text-align: center;}
	#buttons input{
		font-size: 16px;
		background-color: #CCC;
		font-weight: normal;
		height: 20px;
		line-height: 20px;
		text-align: center;
		border-width: 0px;
		width: 90px;
	}
	.page{
		height: 50px;
		line-height: 50px;
		text-align: center;
	}
	tr{
		height: 26px;
		border-bottom: 1px dashed #cdcdcd;
		line-height: 26px;
		padding-left: 10px;
		font-size: 16px;
	}
	tr:hover{
		
	}
	</style>
	
</head>
<body>
<div id='buttons' style="height: 40px; padding: 3px; line-height: 30px;">
<form id="a" name="a" action="__CONTROLLER__/plcz" method="get">

&nbsp;&nbsp;
<input name="btn0" type="submit" value="未审核查询">
<input name="btn1" type="submit" value="批量审核">
<input name="btn2" type="submit" value="批量取消">
<input name="btn3" type="submit" value="批量删除">
</div>


	
      <span style="font-size: 15px; ">&nbsp;&nbsp;&nbsp;&nbsp;栏目</span>
      <select id="type" name="type" style="margin: 5px;">
      <option value='' >请选择类型</option>

      <option value="1" <if condition="$type eq 1">selected="selected"</if>>公司文化</option>
       <option value="2" <if condition="$type eq 2">selected="selected"</if>>公司新闻</option>
       <option value="3" <if condition="$type eq 3">selected="selected"</if>>产品展示</option>
       <option value="4" <if condition="$type eq 4">selected="selected"</if>>联系我们</option>
       <option value="5" <if condition="$type eq 5">selected="selected"</if>>在线留言</option>
       <option value="6" <if condition="$type eq 6">selected="selected"</if>>销售网络</option>
       <option value="7" <if condition="$type eq 7">selected="selected"</if>>在线客服</option>
	   </select>
	  
	   <input id="title" name="title" type="text" value="{$title}" placeholder="文章标题" />

      <input class="btn btn-success" name="btn4" type="submit"  value="查询">
      </span>



<table style="margin: 3px;" width="99%" bgcolor="#b8d0d6" border="0" cellspacing="1" cellpadding="0" class="table">
<tr style="background-color: #FFC;font-weight: bold;">
<td width="4%" bgcolor="#FFFFFF"><input type="checkbox" name="sall" id="sall" onclick="swapCheck()"></td>
<td width="4%" align="right" bgcolor="#FFFFFF">编号</td>
<td width="25%" align="right" bgcolor="#FFFFFF">标题</td>
<td width="10%" align="right" bgcolor="#FFFFFF">栏目</td>
<td width="16%" align="right" bgcolor="#FFFFFF">发布时间</td>
<td width="6%" align="right" bgcolor="#FFFFFF">点击次数</td>
<td width="12%" align="right" bgcolor="#FFFFFF">审核状态</td>
<td width="20%" align="right" headers="22" bgcolor="#FFFFFF">操作</td>
</tr>
<volist name="list" id="vo">
<tr>
<td width="4%" bgcolor="#FFFFFF"><input type="checkbox" name="ck[]" value="{$vo.infoid}"></td>
<td width="9%" align="right" bgcolor="#FFFFFF">{$vo.infoid}</td>
<td width="9%" align="right" bgcolor="#FFFFFF">{$vo.infotitle}</td>
<td width="9%" align="right" bgcolor="#FFFFFF">{$vo.infoclass|getclassname}[{$vo.infoclass}]</td>
<td width="9%" align="right" bgcolor="#FFFFFF">{$vo.infodatetime}</td>
<td width="9%" align="right" bgcolor="#FFFFFF">{$vo.infocount}</td>


<if condition = "$vo[infopost] eq 0">
	<td><span class="btn btn-danger" onclick="statu(this,{$vo[infoid]},{$vo[infopost]})">未审核</span></td>
<else />
	<td><span  class="btn btn-success" onclick="statu(this,{$vo[infoid]},{$vo[infopost]})">审核通过</span></td>
</if>




<td width="9%" align="right" bgcolor="#FFFFFF"><a href="__CONTROLLER__/editform/infoid/{$vo.infoid}/infoclass/{$vo.infoclass}" class="btn btn-success">修改</a> <a href="__CONTROLLER__/del/id/{$vo.infoid}" class="btn btn-danger" >删除</a></td>
</tr>
</volist>
</table>
</form>
<div class="page">
		
		{$page}

</div>
</body>
<script type="text/javascript">
//修改状态
function statu(obj,id,statu){
	if(statu==1){
		//禁用状态
		$.post("{:U('editlist/ajax_statu')}",{infoId:id,infoPost:'0'},function(data){
			
			// alert(data+"正常");
			if(data==1){
				$(obj).html('未审核');
				$(obj).addClass('btn-danger').removeClass('btn-success');
				$(obj).attr('onclick','statu(this,'+id+',0)');
			}
		});
	}else{
		// 正常状态
		$.post("{:U('editlist/ajax_statu')}",{infoId:id,infoPost:'1'},function(data){
		// alert(data+"禁用");
			if(data==1){
				$(obj).html('审核通过');
				$(obj).addClass('btn-success').removeClass('btn-danger');
				$(obj).attr('onclick','statu(this,'+id+',1)');
			}
		});
	}
}
</script>
<!-- 全选 -->
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript">
		var isCheckAll = false;
		function swapCheck() {
			if (isCheckAll) {
				$("input[type='checkbox']").each(function() {
					this.checked = false;
				});//input[type='checkbox']  
				//jQuery each()方法为每个匹配元素规定要运行的函数。
				isCheckAll = false;
			} else {
				$("input[type='checkbox']").each(function() {
					this.checked = true;
				});
				isCheckAll = true;
			}
		}

</script>

</html>